# encoding: utf-8
require 'authenticated_system'
class ApplicationController < ActionController::Base
  helper :all
  protect_from_forgery
  
  #helper_method :logged_in?
    
  include AuthenticatedSystem
  #include ExceptionLoggable

  #判断是否登录
#  def login_required
#    unless logged_in?
#      store_location
#      redirect_to login_path
#    end
#  end
#  
#  def logged_in?
#    false
#  end
  
  def assert_current_user?
    return false unless logged_in?
  	current_user.id == params[:id].to_i
  end
  
  private

  def local_request?
    false
  end
end
